﻿using System;
using System.Collections.Generic;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using BusinessLogic.ClassFactory;
using ValidateCommon;

namespace RichECMS.ServerPages
{
    public partial class IfrmMain : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                if (Request["Section"]!=null)
                {
                    if (ParamAuth.IsNumber(Request["Section"].ToString()))
                    {
                        State.intSTID = int.Parse(Request["Section"].ToString());
                    }
                }
                else
                {
                    using (SectionsFactory objFactory = new SectionsFactory())
                    {
                        BusinessLogic.BusinessRules.Sections objsection = objFactory.CreatorBySql(" intWSID="+State.intWSID);
                        if (objsection != null)
                        {
                            State.intSTID = objsection.DataItem.intSectionID;
                        }
                        else
                        {
                            //此时没有栏目
                            State.intSTID = -1;
                        }
                    }
                }
            }
        }
    }
}